# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-cattrs
pkgver=23.2.3
pkgrel=1
pkgdesc="Complex custom class converters for attrs"
url="https://github.com/python-attrs/cattrs"
arch="noarch"
license="MIT"
depends="python3 py3-attrs"
makedepends="
	py3-gpep517
	py3-hatch-vcs
	py3-hatchling
	"
options="!check" # loads of missing deps
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/c/cattrs/cattrs-$pkgver.tar.gz"
builddir="$srcdir/cattrs-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 setup.py test
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
1defa5b8f43eb0c585db09bbca54358ab9595e0842ace37b8980d8f3d48f2690675b0901d1cb9636fcd8cd81859b5c65df2034867a9b8b4ed4776ba9ed7945a3  cattrs-23.2.3.tar.gz
"
